package com.rxh.service;

import com.rxh.pojo.base.Page;
import com.rxh.pojo.base.PageResult;
import com.rxh.pojo.base.SearchInfo;
import com.rxh.pojo.core.*;
import com.rxh.vo.VoCoreOrder;
import com.rxh.vo.VoCoreOrderChange;
import com.rxh.vo.VoCoreOrderExport;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface TransactionService {
    /**
     * 后台管理获取订单信息
     *
     * @param page 分页以及查询信息
     * @return 订单信息
     */
    PageResult getOrderList(Page page);

    CoreOrder selectByMerchantIdAndMerchantOrderId(Integer merchantId, String merchantOrderId);

    Map<String, Object> getTransStatistics(SearchInfo searchInfo);

    /**
     * 商户后台管理获取订单信息
     *
     * @param page 分页以及查询信息
     * @return 订单信息
     */
    PageResult getMerchantOrderList(Page page);

    Map<String, Object> getMerchantTransStatistics(SearchInfo searchInfo);

    Map<String, Object> getBondStatistics(SearchInfo searchInfo);

    Map<String, Object> getInquireInit();

    Map<String, Object> getMerchantInquirerInit(Integer merchantId);

    Map<String, Object> getRefusedInquireInit();

    Map<String, Object> getOrderDetail(CoreOrder order);

    CoreCargoTrack getOrderCargoTrack(Long orderId);

    Map<String, Object> getMerchantOrderDetail(CoreOrder order);

    List<VoCoreOrderExport> getExportOrderInfo(SearchInfo searchInfo);

    List<CoreOrderChange> batchOperation(List<CoreOrderChange> orderChanges, String type);

    CoreMerchantOrder getMerchantOrderByOrderId(Long orderId);

    boolean orderChange(CoreOrderChange orderChange);

    List<Map<String, Object>> getRefusedStatistics(SearchInfo searchInfo);

    Integer getOrderCountBySearchInfo(SearchInfo searchInfo);

    Integer getOrderChangeCountBySearchInfo(SearchInfo searchInfo);

    PageResult getBondInfo(Page page);

    Map<String, Object> getBondInit();

    Map<String, Object> getMerchantBondInit(Integer merchantId);

    List<VoCoreOrder> getExportBondInfo(SearchInfo searchInfo);

    PageResult getMerchantOrderChangeList(Page page);

    List<VoCoreOrderChange> getExportOrderChangeInfo(SearchInfo searchInfo);

	Map<String, Object> getOrderTrackInit();

	Map<String, Object> getOrderTrackInfo(Map<String, Object> paramMap);

	Map<String, Object> getOrderChangeInit();

	Map<String, Object> getOrderChangeInfo(Map<String, Object> paramMap);

    BigDecimal getOrderRmbAmountBySearchInfo(SearchInfo searchInfo);

    BigDecimal getOrderChangeRmbAmountBySearchInfo(SearchInfo searchInfo);

    CoreOrder getCoreOrderByOrderId(Long OrderId);

    CoreOrderChange getCoreOrderChangeById(Long OrderChangeId);

    CoreMerchantOrderRmb getALLCoreMerchantOrderRmbById(Long orderId);

    int updateCoreMerchantOrderRmb(CoreMerchantOrderRmb coreMerchantOrderRmb);

    int updateCoreMerchantOrderId(Long newId,Long oldId);

    int updateCoreOrderByEntity(CoreOrder coreOrder);

    int updateCoreOrderChangeByEntity(CoreOrderChange coreOrderChange);

    int updateByPrimaryKeySelectiveByOrderId(CoreMerchantOrder coreMerchantOrder);
}
